package com.slz3.business.module.messageManagement.mesCreate.steward;

import com.slz3.business.module.messageManagement.mesCreate.domain.MesCreate;
import com.slz3.business.module.messageManagement.mesCreate.domain.MesCreateCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

import javax.annotation.Resource;

@Component
public class MesCreateResponse extends MesCreateResController {

    public  Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(MesCreate.class).flatMap(mesCreate ->
                super.add(req, mesCreate)
        );
    }

    public  Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(MesCreateCondition.class).flatMap(mesCreateCondition ->
                super.delete(req, mesCreateCondition)
        );
    }

    public  Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(MesCreate.class).flatMap(mesCreate ->
                super.modify(req, mesCreate)
        );
    }


    public  Mono<ServerResponse> list(ServerRequest req) {
        return super.list(req);
    }

    public  Mono<ServerResponse> info(ServerRequest req) {
        return super.info(req);
    }

    public  Mono<ServerResponse> choice(ServerRequest req) {
        return super.choice(req);
    }

    public  Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(MesCreateCondition.class).flatMap(mesCreateCondition ->
                super.auditSubmit(req, mesCreateCondition)
        );
    }

    public  Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(MesCreateCondition.class).flatMap(mesCreateCondition ->
                super.audit(req, mesCreateCondition)
        );
    }

    public  Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(MesCreateCondition.class).flatMap(mesCreateCondition ->
                super.auditReject(req, mesCreateCondition)
        );
    }

    public  Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(MesCreateCondition.class).flatMap(mesCreateCondition ->
                super.usingEnable(req, mesCreateCondition)
        );
    }

    public  Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(MesCreateCondition.class).flatMap(mesCreateCondition ->
                super.usingDisable(req, mesCreateCondition)
        );
    }   

}
